<div>
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <label class="layui-form-label" style="background-color: #f2f2f2">用户名:</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" autocomplete="off" name="username" required
                       placeholder="手机/邮箱/用户名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="background-color: #f2f2f2">密码:</label>
            <div class="layui-input-inline">
                <input type="password" class="layui-input" autocomplete="off" name="password" required placeholder="密码">
            </div>
        </div>
        <p style="color: red" id="message"></p>
        <button class="layui-btn" lay-submit="" lay-filter="login">立即登录</button>
        <a href="#">忘记密码？</a>
    </form>
</div>
<a href="{% url 'user-login' 'login_qq' %}">
    <i class="layui-icon layui-icon-login-qq" style="font-size: 30px; color: #1E9FFF;"></i>
</a>
<script type="text/javascript">
  let href = window.location.href
  if (href.includes('#access_token=')) {
    window.location.href = href.replace('#', '?') + '&qq=' + true
  }
</script>